/**
 * User: sunny
 * Date: 14-5-23
 * Time: 下午7:35
 */
$(document).ready(function() {
    $('#addArticleForm').submit(function() {
        $.post($(this).attr('action'),$(this).serialize(),function(data) {
            if (data.code == 0) {
                alert('发布成功');
				location.href = location.href;
            } else {
                alert(data.msg);
            }
        },'json');
        return false;
    });
});